﻿using System;
using System.Linq;
using Security.Domain;

namespace Security.Specs.DataLayer
{
    public interface ISecurityDataModel
    {
        IQueryable<Employee> Employees { get; }
        void AddEmployees(Employee[] employees);
        void SaveEmployeesChanges(Employee[] employees);
        void DeleteEmployees(Employee[] employees);

        IQueryable<Post> Posts { get; }
        void AddPosts(Post[] posts);
        void SavePostsChanges(Post[] posts);
        void DeletePosts(Post[] posts);

        IQueryable<Department> Departments { get; }
        void AddDepartments(Department[] departments);
        void SaveDepartmentsChanges(Department[] departments);
        void DeleteDepartments(Department[] departments);

        IQueryable<Permission> Permissions { get; }
        void AddPermissions(Permission[] permissions);
        void SavePermissionsChanges(Permission[] permissions);
        void DeletePermissions(Permission[] permissions);

        IQueryable<ServerLogin> ServerLogins { get; }
        IQueryable<Town> Towns { get; }
        IQueryable<Region> Regions { get; }
        IQueryable<CounterpartyType> CounterpartyTypes { get; }
        IQueryable<Counterparty> Counterparties { get; }
        IQueryable<PostPermission> PostPermissions { get; }
        IQueryable<EmployeePermission> EmployeePermissions { get; }
        IQueryable<LoginEmployee> LoginEmployees { get; }
        void AddServerLogin(ServerLogin[] serverLogins);
        void SaveServerLoginChanges(ServerLogin[] serverLogins);
        void DeleteServerLogin(ServerLogin[] serverLogins);

        IDatabaseCache Cache { get; }
    }
}
